Never return NULL from gdk_get_program_class
authorTimm Bäder <mail@baedert.org>
Sun, 5 Feb 2017 13:59:19 +0000 (14:59 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 5 Feb 2017 14:03:35 +0000 (15:03 +0100)
gdk_init is not calling g_set_prgname anymore, so just return a dummy
string from gdk_get_program_class if it has not been set before.

gdk/gdk.c

index 423df8038f6ee988d008ca62784a9ab2d246a442..c7cd32a324383004550eccc96076ec5ae0c54606 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -745,7 +745,10 @@ gdk_threads_add_timeout_seconds (guint       interval,
 const char *
 gdk_get_program_class (void)
 {
-  return gdk_progclass;
+  if (gdk_progclass)
+    return gdk_progclass;
+
+  return "GTK+ Application";
 }
 
 /**